<?php
if(!check_manager_login()) exit('无权查看，请登录!');
require_once(MODEL_PATH.DS.'Product.php');
$Product = new Product();
$page = isset($_GET['page'])?(int)$_GET['page']:1;
$limit = 10;
$offset = $page * $limit - $limit;
$pro_list = $Product->getAllProductList($offset,$limit);
$pro_nums = $Product->countProducts();
if(count($pro_list)>=$limit || $page >1){
	$url   = get_page_url();
	$pages = get_pagehtml($pro_nums, $limit, $page, $url);
}
include load_tpl('product_list');
?>